Implementation of Newton-Raphson method to solve a system of nonlinear equations in parallel. More...
#include <newton_raphson_solver_implementation.hpp>
Public Types | |
typedef NonlinearSolverImplementation < T, I >::VectorType | VectorType |
typedef NonlinearSolverImplementation < T, I >::JacobianBuilder | JacobianBuilder |
typedef NonlinearSolverImplementation < T, I >::FunctionBuilder | FunctionBuilder |
Public Member Functions | |
NewtonRaphsonSolverImplementation (const parallel::Communicator &comm, const int &local_size, JacobianBuilder form_jacobian, FunctionBuilder form_function) | |
Default constructor. | |
NewtonRaphsonSolverImplementation (MatrixT< T, I > &J, JacobianBuilder form_jacobian, FunctionBuilder form_function) | |
Construct with an existing Jacobian Matrix. | |
~NewtonRaphsonSolverImplementation (void) | |
Destructor. |
Implementation of Newton-Raphson method to solve a system of nonlinear equations in parallel.
This class implements the Newton-Raphson method to solve a system of nonlinear equations in the form
where is the Jacobian matrix,
is the solution Vector, and
is some Vector function of
.
Each successive solution estimate is computed as
where is determined by solving the linear system
and is the number of the previous iteration.
The interative process is ended when the L2 norm of is less then some specified small tolerance.
typedef NonlinearSolverImplementation<T, I>::FunctionBuilder gridpack::math::NewtonRaphsonSolverImplementation< T, I >::FunctionBuilder |
Reimplemented from gridpack::math::NonlinearSolverImplementation< T, I >.
typedef NonlinearSolverImplementation<T, I>::JacobianBuilder gridpack::math::NewtonRaphsonSolverImplementation< T, I >::JacobianBuilder |
Reimplemented from gridpack::math::NonlinearSolverImplementation< T, I >.
typedef NonlinearSolverImplementation<T, I>::VectorType gridpack::math::NewtonRaphsonSolverImplementation< T, I >::VectorType |
Reimplemented from gridpack::math::NonlinearSolverImplementation< T, I >.
gridpack::math::NewtonRaphsonSolverImplementation< T, I >::NewtonRaphsonSolverImplementation | ( | const parallel::Communicator & | comm, | |
const int & | local_size, | |||
JacobianBuilder | form_jacobian, | |||
FunctionBuilder | form_function | |||
) |
Default constructor.
Collective.
A NonlinearSolverImplementation must be constructed simultaneously on all processes involved in comm
.
comm | communicator on which the instance is to exist | |
local_size | number Jacobian rows and Vector entries to be owned by this process | |
form_jacobian | function to fill the Jacobian Matrix, ![]() | |
form_function | function to fill the RHS function Vector, ![]() |
References gridpack::utility::Configurable::configurationKey().
gridpack::math::NewtonRaphsonSolverImplementation< T, I >::NewtonRaphsonSolverImplementation | ( | MatrixT< T, I > & | J, | |
JacobianBuilder | form_jacobian, | |||
FunctionBuilder | form_function | |||
) |
Construct with an existing Jacobian Matrix.
References gridpack::utility::Configurable::configurationKey().
gridpack::math::NewtonRaphsonSolverImplementation< T, I >::~NewtonRaphsonSolverImplementation | ( | void | ) |
Destructor.
This must be called simultaneously by all processes involved in the communicator used for construction.